package encryption

import (
	"crypto/md5"
	"crypto/sha1"
	"encoding/hex"
)

func CryptoMd5(str, t string) string {
	var md5Total string
	md5Total = str + t
	md5Init := md5.New()
	md5Init.Write([]byte(md5Total))
	return hex.EncodeToString(md5Init.Sum(nil))
}

func Hash(value []byte) string {
	sha := sha1.New()
	sha.Write(value)
	hash := hex.EncodeToString(sha.Sum(nil))
	return hash
}
